package com.greendragon.service.frontend.impl; 

import java.util.List;

import com.greendragon.persistence.dao.ICategoryDao;
import com.greendragon.persistence.domain.LinkCategory;
import com.greendragon.persistence.enmu.FetchOrderType;
import com.greendragon.service.frontend.ICategoryFrontendService;

/** 
 * @author wulibin, exceptsky@gmail.com, 2011-11-12 下午03:24:01
 * 
 */
public class LinkCategoryFrontendService extends BaseFrontendService<LinkCategory> implements ICategoryFrontendService<LinkCategory>{
	private ICategoryDao<LinkCategory> categoryDao;

	@Override
	public List<LinkCategory> getAllRootCategories(int page){
		return categoryDao.getAllRootCategories(page*pageLength, pageLength, FetchOrderType.CREATE_DESC);
	}
	@Override
	public LinkCategory getByName(String name){
		return categoryDao.getByName(name);
	}
	public void setCategoryDao(ICategoryDao<LinkCategory> categoryDao) {
		this.categoryDao = categoryDao;
		this.setDao(categoryDao);
	}

}
 